package com.bobby.pojo;

import java.util.List;

/**
 * @Description TODO
 * @Date 2020/8/14 20:22
 * @Created wenjunpei
 */
public class Page<T> {
    public static final Long PAGE_SIZE = 4L;
    private Long pageNo;    //当前页码
    private Long pageTotal;  //总页码
    private Long pageTotalCount;    //总记录数
    private Long pageSize = PAGE_SIZE;         //每页显示数量
    private List<T> items;
    private String url;

    public Page() {
    }

    public Page(Long pageNo, Long pageTotal, Long pageTotalCount, Long pageSize, List<T> items) {
        this.pageNo = pageNo;
        this.pageTotal = pageTotal;
        this.pageTotalCount = pageTotalCount;
        this.pageSize = pageSize;
        this.items = items;
    }

    public Long getPageNo() {
        return pageNo;
    }

    public void setPageNo(Long pageNo) {
        this.pageNo = pageNo;
    }

    public Long getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(Long pageTotal) {
        this.pageTotal = pageTotal;
    }

    public Long getPageTotalCount() {
        return pageTotalCount;
    }

    public void setPageTotalCount(Long pageTotalCount) {
        this.pageTotalCount = pageTotalCount;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "Page{" +
                "pageNo=" + pageNo +
                ", pageTotal=" + pageTotal +
                ", pageTotalCount=" + pageTotalCount +
                ", pageSize=" + pageSize +
                ", items=" + items +
                ", url='" + url + '\'' +
                '}';
    }
}
